﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UNavigation1.ascx.cs" Inherits="VTNT.Presentation.Web.MIS.mods.front.UNavigation1" %>
<div class="navigation">
    <div class="nav-title">
        <div>
            <img class="nav-title-icon"/>
            <a>{Name}</a>                                           
        </div>        
    </div>                                    
    <div class="nav-item">
        <ul class="nav-content">
            <li class="nav-content-item" id="{ID}">
                <img class="nav-item-icon"/>
                <a href="{LinkURL}">{Code}-{Name}</a>
            </li>
        </ul>
    </div>
</div>
<script>
    var dynamicMenu, dynamicNav;
    $(function () {
        var data = [
                { ID: 1, Code: 'A', Name: 'Home', Description: '', ParentID: null, LinkURL: '#Home' },
                { ID: 2, Code: 'B', Name: 'Products', Description: '', ParentID: null, LinkURL: '#Products' },
                { ID: 3, Code: 'C', Name: 'Support', Description: '', ParentID: null, LinkURL: '#Support' },
                { ID: 4, Code: 'D', Name: 'Communities', Description: '', ParentID: null, LinkURL: '#Communities' },
                { ID: 5, Code: 'E', Name: 'About', Description: '', ParentID: null, LinkURL: '#About' },
                { ID: 21, Code: 'B1', Name: 'Products 1', Description: '', ParentID: 2, LinkURL: '#Products1' },
                { ID: 22, Code: 'B2', Name: 'Products 2', Description: '', ParentID: 2, LinkURL: '#Products2' },
                { ID: 221, Code: 'B21', Name: 'Products 21', Description: '', ParentID: 22, LinkURL: '#Products22' },
                { ID: 222, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 22, LinkURL: '#Products222' }
            ];
        var data1 = [
                { ID: 1, Code: 'B', Name: 'Products', Description: '', ParentID: null, LinkURL: '#Products' },
                { ID: 11, Code: 'B1', Name: 'Products 1', Description: '', ParentID: 1, LinkURL: '#Products1' },
                { ID: 12, Code: 'B2', Name: 'Products 2', Description: '', ParentID: 1, LinkURL: '#Products2' },
                { ID: 13, Code: 'B21', Name: 'Products 21', Description: '', ParentID: 1, LinkURL: '#Products22' },
                { ID: 14, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 15, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 16, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 17, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 18, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 19, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' },
                { ID: 20, Code: 'B22', Name: 'Products 22', Description: '', ParentID: 1, LinkURL: '#Products222' }
            ];
        dynamicNav = new RMS.CDynamicTemplate({
            id: '.navigation',
            type: 'nav',
            data: data,
            callback: function (instance) {
                var settings = { height: '100%', width: '100%', expandMode: 'singleFitHeight' },
                    meta;
                $(instance.settings.id).each(function () {
                    meta = this.attributes[RMS.consts.settings];
                    if (meta) {
                        $.extend(true, settings, JSON.parse(meta.value));
                    }
                    $(this).jqxNavigationBar(settings);
                });
            }
        });
    });
</script>